package com.ericsson.enap.modules.ebmLog.job.vgc;

import com.ericsson.common.quartz.job.MainJob;
import com.ericsson.common.quartz.job.ManualQuartzJob;
import com.ericsson.common.quartz.service.QuartzTableManager;
import com.ericsson.enap.modules.ebmLog.task.vgc.VgcEbmDownloadTask;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * VGCEBM原始文件下载
 * @author yanghai
 * nohup java -jar vgcEbmDown.jar >/dev/null 2>&1 &
 */
@Component
public class VgcEbmDownloadJob implements MainJob {
    @Autowired
    QuartzTableManager quartzTableManager;
    @Autowired
    VgcEbmDownloadTask vgcEbmDownloadTask;
    String jobName="vgcEbmDownloadJob";
    @Override
    public void doTask() {
        System.out.println("VgcEbmDownloadJob start.....");
        //vgcEbmDownloadTask.execute();
        quartzTableManager.addManualTaskJob(jobName,jobName,jobName,jobName, ManualQuartzJob.class,"0 1/5 * * * ?",vgcEbmDownloadTask);
    }
}
